<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>期货市场净空单量数据</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            padding: 20px 15px;
            color: #333;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
        }

        .header {
            background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
            color: white;
            padding: 20px 15px;
            border-radius: 16px 16px 0 0;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            font-size: 20px;
            margin-bottom: 6px;
            font-weight: 600;
        }

        .header p {
            opacity: 0.8;
            font-size: 13px;
        }

        .data-card {
            background: white;
            border-radius: 0 0 16px 16px;
            padding: 15px;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        .card-title {
            display: flex;
            align-items: center;
            padding-bottom: 12px;
            margin-bottom: 12px;
            border-bottom: 1px solid #eaeaea;
        }

        .status-indicator {
            display: inline-block;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .status-green {
            background-color: #2ecc71;
        }

        .status-red {
            background-color: #e74c3c;
        }

        .card-title-text {
            font-weight: 600;
            font-size: 17px;
            color: #2c3e50;
        }

        .data-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f5f5f5;
        }

        .data-row:last-child {
            border-bottom: none;
        }

        .index-name {
            font-weight: 500;
            font-size: 15px;
            color: #2c3e50;
            flex: 1;
        }

        .net-short {
            font-weight: 600;
            font-size: 15px;
            color: #2c3e50;
            flex: 1;
            text-align: center;
        }

        .change {
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 13px;
            flex: 1;
            text-align: center;
        }

        .change-positive {
            background-color: rgba(46, 204, 113, 0.15);
            color: #27ae60;
        }

        .change-negative {
            background-color: rgba(231, 76, 60, 0.15);
            color: #c0392b;
        }

        .summary-row {
            background-color: #f8f9fa;
            padding: 10px 15px;
            border-radius: 10px;
            margin-top: 10px;
            font-size: 14px;
            text-align: center;
            color: #7f8c8d;
        }

        .footer {
            text-align: center;
            color: #7f8c8d;
            font-size: 13px;
            margin-top: 25px;
            padding: 0 10px;
        }

        .legend {
            display: flex;
            justify-content: center;
            margin-top: 15px;
            gap: 15px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            font-size: 13px;
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 5px;
        }

        .change-header {
            display: flex;
            justify-content: space-between;
            padding: 0 15px 10px;
            font-size: 14px;
            color: #7f8c8d;
            font-weight: 500;
        }

        .change-header div {
            flex: 1;
            text-align: center;
        }

        .data-header {
            display: flex;
            justify-content: space-between;
            padding: 0 15px 10px;
            font-size: 14px;
            color: #7f8c8d;
            font-weight: 500;
        }

        .data-header div {
            flex: 1;
        }

        .data-header div:first-child {
            text-align: left;
        }

        .data-header div:nth-child(2) {
            text-align: center;
        }

        .data-header div:last-child {
            text-align: center;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h1>期货市场净空单量数据</h1>
        <p>最新机构持仓变化分析</p>
    </div>

    <div class="data-card">
        <div class="card-title">
            <span class="status-indicator ${allYestValueStatus}"></span>
            <span class="card-title-text">所有机构</span>
        </div>
        <div class="summary-row">
            ${allYestValue}
        </div>
    </div>

    <div class="data-card" style="border-radius:16px;">
        <div class="card-title">
            <span class="status-indicator ${zxAllYestValueStatus}"></span>
            <span class="card-title-text">中信</span>
        </div>

        <div class="data-header">
            <div>指数</div>
            <div>净空单量</div>
            <div>对比前日</div>
        </div>

        <div class="data-row">
            <div class="index-name">上证50</div>
            <div class="net-short">${zxIhNetValue}</div>
            <div class="change ${zxIhYestValueStatus}">${zxIhYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">沪深300</div>
            <div class="net-short">${zxIfNetValue}</div>
            <div class="change ${zxIfYestValueStatus}">${zxIfYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">中证500</div>
            <div class="net-short">${zxIcNetValue}</div>
            <div class="change ${zxIcYestValueStatus}">${zxIcYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">中证1000</div>
            <div class="net-short">${zxImNetValue}</div>
            <div class="change ${zxImYestValueStatus}">${zxImYestValue}</div>
        </div>

        <div class="summary-row">
            ${zxAllYestValue}
        </div>
    </div>

    <div class="data-card" style="border-radius:16px;">
        <div class="card-title">
            <span class="status-indicator ${otherAllYestValueStatus}"></span>
            <span class="card-title-text">其他机构</span>
        </div>

        <div class="data-header">
            <div>指数</div>
            <div>净空单量</div>
            <div>对比前日</div>
        </div>

        <div class="data-row">
            <div class="index-name">上证50</div>
            <div class="net-short">${otherIhNetValue}</div>
            <div class="change ${otherIhYestValueStatus}">${otherIhYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">沪深300</div>
            <div class="net-short">${otherIfNetValue}</div>
            <div class="change ${otherIfYestValueStatus}">${otherIfYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">中证500</div>
            <div class="net-short">${otherIcNetValue}</div>
            <div class="change ${otherIcYestValueStatus}">${otherIcYestValue}</div>
        </div>
        <div class="data-row">
            <div class="index-name">中证1000</div>
            <div class="net-short">${otherImNetValue}</div>
            <div class="change ${otherImYestValueStatus}">${otherImYestValue}</div>
        </div>

        <div class="summary-row">
            ${otherAllYestValue}
        </div>
    </div>

    <div class="footer">
        <p>更新时间: ${updateTime} | 数据来源: 期货公开数据</p>
    </div>
</div>
</body>
</html>
